package com.eduask.service.impl;

import java.util.List;

import org.springframework.beans.factory.annotation.Autowired;
import org.springframework.stereotype.Service;
import org.springframework.transaction.annotation.Transactional;

import com.eduask.beans.Messages;
import com.eduask.dao.MessagesDAO;
import com.eduask.service.MessagesService;

@Transactional
@Service
public class MessagesServiceImpl implements MessagesService{

	@Autowired
	private MessagesDAO messagesDAO;
	
	@Override
	public List<Messages> findAll() {
		return messagesDAO.findAllMessagess();
	}

	@Override
	public void save(Messages messages) {
		messagesDAO.saveMessages(messages);
	}

	@Override
	public void delete(Messages messages) {
		messagesDAO.removeMessages(messages);
	}

	@Override
	public Messages findById(Integer id) {
		return messagesDAO.findMessagesById(id);
	}

}
